void setup()
{
    Serial.begin( 9600 );
    Serial.println("Start");
    delay( 200 );
}

void loop()
{
  int on = 253;
  int off = 252;
  while(Serial.available==1){
   // Serial.print(on,HEX);
    delay(1000);
    Serial.print(off, HEX);
    delay(1000);
  //  Serial.print(0xFE);
    delay(1000);
    Serial.print(0xFF);
  //  Serial.print(off, HEX);
    delay(500);
  }
}

//out = ''
//ser.write(chr(0xFD)) #toggle red light on
//time.sleep(2) #wait 2 seconds
//ser.write(chr(0xFC)) #toggle red light off
//time.sleep(2) #wait 2 seconds
//#ser.write(chr(0xFE)) #toggle green light off
//#time.sleep(2) #wait 2 seconds
//#ser.write(chr(0xFF)) #toggle green light on
//#time.sleep(2) #wait 2 seconds
//#ser.write(chr(0xFB)) #read tag (ReadUID)
//#time.sleep(2) #wait 2 seconds
//#quiet tag B: 00 00 f1 6f 8a 12 00 01 04 e0 fb 48
//ser.write(chr(0x01)+chr(0x18)+chr(0x00)+chr(0x03)+chr(0x04)+chr(0x45)+chr(0x23)+chr(0x02)+chr(0x00)+chr(0x00)+chr(0xF1)+chr(0x6F)+\
//chr(0x8A)+chr(0x12)+chr(0x00)+chr(0x01)+chr(0x04)+chr(0xE0)+chr(0xFB)+chr(0x48)+chr(0xC6)+chr(0x92)+chr(0xEF)+chr(0x10))
//time.sleep(2) #wait 2 seconds
//ser.write(chr(0xFA)) #read tag (Fast Mode)
//time.sleep(2) #wait 2 seconds
//out = ser.readline()
//print toHex(out)
//
//#quiet tag H: 00 00 f1 6f 8a 12 00 01 04 e0 fb 48
//ser.write(chr(0x01)+chr(0x18)+chr(0x00)+chr(0x03)+chr(0x04)+chr(0x45)+chr(0x23)+chr(0x02)+chr(0x00)+chr(0x00)+chr(0xF1)+chr(0x6F)+\
//chr(0x8A)+chr(0x12)+chr(0x00)+chr(0x01)+chr(0x04)+chr(0xE0)+chr(0xFB)+chr(0x48)+chr(0xC6)+chr(0x92)+chr(0xEF)+chr(0x10))
//time.sleep(2) #wait 2 seconds
//ser.write(chr(0xFA)) #read tag (Fast Mode)
//time.sleep(2) #wait 2 seconds
//out = ser.readline()
//print toHex(out)
//
//ser.close()


